<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">	
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
  <link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
  <link href="css/templatemo_style.css" rel="stylesheet" type="text/css">	
  <title>Insert title here</title>		
  
  <script src="scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
  <script src="scripts/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>
  <script type="text/javascript">
    function _getCode(){
    	var ele = document.getElementById("getcode")
    	var username= document.getElementById("username");
    	alert(username.val());
    	ele.src="<c:url value='/UserServlet?method=getCode&username="+ username.val() +"'/>";
    }
  
  </script>
</head>
<body class="templatemo-bg-gray">
	<div class="container">
		<div class="col-md-12">
			<h1 class="margin-bottom-15">密码重置</h1>
			<form class="form-horizontal templatemo-forgot-password-form templatemo-container" role="form" action="<c:url value='/UserServlet'/>" method="post">	
		        <input type="hidden" name="method" value="resetPassword"/>	
		        <div class="form-group">
		          <div class="col-md-12">
			        <label for="password" class="control-label">输入账号</label>
		            <input type="text" class="form-control" name="username" id="username" placeholder="">	            
		          </div>              
		        </div>
		        <div class="form-group">
		          <div class="col-md-12">
				  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		            <input type="button" height="30" width="120" value="获取验证码" class="btn btn-danger" id="getcode" src="javascript:_getCode()">
		           &nbsp; &nbsp; &nbsp; &nbsp;验证码将发至账号对应邮箱中
		          </div>
		        </div>	
		        <div class="form-group">
		          <div class="col-md-12">
			        <label for="password" class="control-label">输入验证码</label>
		            <input type="text" class="form-control" name="code" id="code" placeholder="">	            
		          </div>              
		        </div>
				<div class="form-group">
			      <div class="col-md-6">
			        <label for="password" class="control-label">密码</label>
			        <input type="password" class="form-control" name="password1" id="password" placeholder="">
			      </div>
			      <div class="col-md-6">
			        <label for="password" class="control-label">确认密码</label>
			        <input type="password" class="form-control" name="password2"id="password_confirm" placeholder="">
			      </div>
			    </div>
		        <div class="form-group">
		          <div class="col-md-12">
		          	<div class="control-wrapper">
		          		<input type="submit" value="确认重置" class="btn btn-info">
		          	</div>
		          </div>
		        </div>
		      </form>
		</div>
	</div>
</body>
</html>